package org.example.leetcode.core.mq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class RabbitMQService {
    @Resource
    RabbitTemplate rabbitTemplate;
    public  void send(String exchange,String topic,String message){
        rabbitTemplate.convertAndSend(exchange,topic,message);
    }
}
